package com.ideabobo.model;
import com.alibaba.fastjson.JSON;
public class Dbtablemapping {
	public static Object parseStringModel(String value, String table) {
		Object object = null;
		switch (table) {
			case "qq_banji": object = JSON.parseObject(value, Banji.class); break;
			case "qq_beiwang": object = JSON.parseObject(value, Beiwang.class); break;
			case "qq_beizhu": object = JSON.parseObject(value, Beizhu.class); break;
			case "qq_fankui": object = JSON.parseObject(value, Fankui.class); break;
			case "qq_huodong": object = JSON.parseObject(value, Huodong.class); break;
			case "qq_jiaoshi": object = JSON.parseObject(value, Jiaoshi.class); break;
			case "qq_message": object = JSON.parseObject(value, Message.class); break;
			case "qq_notice": object = JSON.parseObject(value, Notice.class); break;
			case "qq_posts": object = JSON.parseObject(value, Posts.class); break;
			case "qq_qunzu": object = JSON.parseObject(value, Qunzu.class); break;
			case "qq_record": object = JSON.parseObject(value, Record.class); break;
			case "qq_replay": object = JSON.parseObject(value, Replay.class); break;
			case "qq_type": object = JSON.parseObject(value, Type.class); break;
			case "qq_user": object = JSON.parseObject(value, User.class); break;
			case "qq_yuyue": object = JSON.parseObject(value, Yuyue.class); break;
			case "qq_yzmessage": object = JSON.parseObject(value, Yzmessage.class); break;
		}
		return object;
}
public static Object getModelByTable(String table) {
	Object object = null;
	switch (table) {
			case "qq_banji": object = new Banji(); break;
			case "qq_beiwang": object = new Beiwang(); break;
			case "qq_beizhu": object = new Beizhu(); break;
			case "qq_fankui": object = new Fankui(); break;
			case "qq_huodong": object = new Huodong(); break;
			case "qq_jiaoshi": object = new Jiaoshi(); break;
			case "qq_message": object = new Message(); break;
			case "qq_notice": object = new Notice(); break;
			case "qq_posts": object = new Posts(); break;
			case "qq_qunzu": object = new Qunzu(); break;
			case "qq_record": object = new Record(); break;
			case "qq_replay": object = new Replay(); break;
			case "qq_type": object = new Type(); break;
			case "qq_user": object = new User(); break;
			case "qq_yuyue": object = new Yuyue(); break;
			case "qq_yzmessage": object = new Yzmessage(); break;
		}
		return object;
	}
}
